home *** CD-ROM | disk | FTP | other *** search
- head 1.1;
- branch ;
- access ;
- symbols ;
- locks ; strict;
- comment @ * @;
-
-
- 1.1
- date 91.11.05.15.44.02; author rab; state Exp;
- branches ;
- next ;
-
-
- desc
- @@
-
-
-
- 1.1
- log
- @Initial revision
- @
- text
- @/*
- * struct.h --
- *
- * Declarations of macros for getting infomation about the fields
- * in a structure.
- *
- * Copyright 1991 Regents of the University of California
- * Permission to use, copy, modify, and distribute this
- * software and its documentation for any purpose and without
- * fee is hereby granted, provided that this copyright
- * notice appears in all copies. The University of California
- * makes no representations about the suitability of this
- * software for any purpose. It is provided "as is" without
- * express or implied warranty.
- *
- * $Header: /sprite/lib/forms/RCS/proto.h,v 1.7 91/02/09 13:24:52 ouster Exp $ SPRITE (Berkeley)
- */
-
- #ifndef _STRUCT_H
- #define _STRUCT_H
-
- #define fldoff(str, fld) ((int)&(((struct str *)0)->fld))
- #define fldsiz(str, fld) (sizeof(((struct str *)0)->fld))
- #define strbase(str, ptr, fld) \
- ((struct str *)((char *)(ptr)-fldoff(str, fld)))
-
- #endif /* _STRUCT_H */
-
- @
-